# import csv
# import sys
# import os
# import numpy as np

# size = len(sys.argv)
# n = int(sys.argv[size - 1])
# m = int(sys.argv[size - 2])
# sigtype = str(sys.argv[size - 3])


# # 目前比较时间
# time_us_total = 0
# with open(sys.argv[1], newline='') as csvFile:
#     reader = csv.DictReader(csvFile, skipinitialspace=True)
#     time_us_list = [float(row['Task Duration(us)']) for row in reader]
#     time_us = sum(time_us_list[0:]) / len(time_us_list[0:])
#     time_us_total += time_us

# print("sigtype: ", sigtype, "m: ", m, "n: ", n, "time_us: ", time_us_total)

import csv
import sys
import os
import numpy as np

size = len(sys.argv)
n = int(sys.argv[size - 1])
m = int(sys.argv[size - 2])
sigtype = str(sys.argv[size - 3])


# 目前比较时间
time_us_total = 0
# print(sys.argv[1])
with open(sys.argv[1], newline='') as csvFile:
    reader = csv.DictReader(csvFile, skipinitialspace=True)
    time_us_list = [float(row['Avg Time(us)']) for row in reader]
    time_us = sum(time_us_list[0:]) / len(time_us_list[0:])
    time_us_total += time_us

print("sigtype: ", sigtype, "m: ", m, "n: ", n, "time_us: ", time_us_total)
